"use client"
import React,{useEffect} from 'react'
import { useSelector } from 'react-redux';
import { log } from 'console';
import { Table,Input,Select,Form,DatePicker,Button } from "antd";
import AppLayout  from '@/commponent/index'
export default function Kehu(props:any) {
  const obj = useSelector(state=>state.todo)
const handleChange = (value: string) => {
  console.log(`selected ${value}`);
};
    const dataSource = [
      {
        "id":1,
        "title":"深圳亿恩科技有限公司",
        "state":"正在跟进",
        "CustomerStarRating":"⭐⭐⭐⭐⭐",
        "contacts":"李小红",
        "phone":18888888888,
        "endTime":1535187240,
        "time":1537779240
      },
      {
        "id":2,
        "title":"深圳亿恩科技有限公司",
        "state":"正在跟进",
        "CustomerStarRating":"⭐⭐⭐⭐",
        "contacts":"李小红",
        "phone":18888888888,
        "endTime":1535187240,
        "time":1537779240
      },
      {
        "id":3,
        "title":"深圳亿恩科技有限公司",
        "state":"正在跟进",
        "CustomerStarRating":"⭐⭐⭐",
        "contacts":"李小红",
        "phone":18888888888,
        "endTime":1535187240,
        "time":1537779240
      },
      {
        "id":4,
        "title":"深圳亿恩科技有限公司",
        "state":"正在跟进",
        "CustomerStarRating":"⭐",
        "contacts":"李小红",
        "phone":18888888888,
        "endTime":1535187240,
        "time":1537779240
      },
      {
        "id":5,
        "title":"深圳亿恩科技有限公司",
        "state":"正在跟进",
        "CustomerStarRating":"⭐⭐",
        "contacts":"李小红",
        "phone":18888888888,
        "endTime":1535187240,
        "time":1537779240
      },
      {
        "id":6,
        "title":"深圳亿恩科技有限公司",
        "state":"正在跟进",
        "CustomerStarRating":"⭐⭐⭐",
        "contacts":"李小红",
        "phone":18888888888,
        "endTime":1535187240,
        "time":1537779240
      },
    ];
    
    const columns = [
      {
        title: '姓名',
        dataIndex: 'title',
        key: 'id',
      },
      {
        title: '状态',
        dataIndex: 'state',
      },
      {
        title: '客户星级',
        dataIndex: 'CustomerStarRating',
      },
      {
        title: '首联系人',
        dataIndex: 'contacts',
      },
      {
        title: '手机号码',
        dataIndex: 'phone',
      },
      {
        title: '最后跟进',
        dataIndex: 'endTime',
      },
      {
        title: '未跟进天数',
        dataIndex: 'time',
      },
    ];
  return (

              <AppLayout>
                           
                            
                <Input placeholder="搜索关键词"  style={{width:'180px',marginRight:'10px'}}/>
                <Select
                
                placeholder="客户状态" 
                style={{width:'180px',marginRight:'10px'}}
                  onChange={handleChange}
                  options={[
                  { value: '正在跟进', label: '正在跟进' },
                  { value: '未跟进', label: '未跟进' },
                 ]}
    />
                <Input placeholder="客户类型"  style={{width:'180px',marginRight:'10px'}}/>
                <Select
                
                placeholder="客户星级" 
                style={{width:'180px',marginRight:'10px'}}
                  onChange={handleChange}
                  options={[
                  { value: '一星', label: '⭐' },
                  { value: '二星', label: '⭐⭐' },
                  { value: '三星', label: '⭐⭐⭐' },
                  { value: '四星', label: '⭐⭐⭐⭐'},
                  { value: '五星', label: '⭐⭐⭐⭐⭐'},
                 ]}
    />
               
                     <DatePicker placeholder="最后跟进"   style={{width:'180px',marginRight:'10px'}}/>
                     <Button type='primary' style={{marginRight:'5px'}}>查询</Button>
                     <Button>重置</Button>
                    <Table dataSource={dataSource} columns={columns} rowKey='id'/>
                    </AppLayout>

  )
}
